#ifndef VISTAFICHATABLERO_H_
#define VISTAFICHATABLERO_H_

#include <string>
#include <map>
#include <vector>

#include <gtkmm.h>


class VistaEscenario;
class Juego;
class PanelJuego;

class VistaFichaTablero {
  protected:
    int x, y;
    std::string color;
    std::string tipo;
    bool desplazando;
    bool visible;

    virtual void iniciarImagen() = 0;

    virtual std::string elegirColor() = 0;

    int ajustarCoordenada(int unaCoordenada);


    static std::map<std::string, std::map<std::string,
        std::vector<Glib::RefPtr<Gdk::Pixbuf> > > >imagenes;

    static std::vector<Glib::RefPtr<Gdk::Pixbuf> >  buffersButtonBlue;
    static std::vector<Glib::RefPtr<Gdk::Pixbuf> >  buffersButtonYellow;
    static std::vector<Glib::RefPtr<Gdk::Pixbuf> >  buffersButtonGreen;
    static std::vector<Glib::RefPtr<Gdk::Pixbuf> >  buffersButtonRed;
    static std::vector<Glib::RefPtr<Gdk::Pixbuf> >  buffersButtonViolet;

    static std::vector<Glib::RefPtr<Gdk::Pixbuf> >  buffersMiniBarBlueH;
    static std::vector<Glib::RefPtr<Gdk::Pixbuf> >  buffersMiniBarYellowH;
    static std::vector<Glib::RefPtr<Gdk::Pixbuf> >  buffersMiniBarGreenH;
    static std::vector<Glib::RefPtr<Gdk::Pixbuf> >  buffersMiniBarRedH;
    static std::vector<Glib::RefPtr<Gdk::Pixbuf> >  buffersMiniBarVioletH;

    static std::vector<Glib::RefPtr<Gdk::Pixbuf> >  buffersMiniBarBlueV;
    static std::vector<Glib::RefPtr<Gdk::Pixbuf> >  buffersMiniBarYellowV;
    static std::vector<Glib::RefPtr<Gdk::Pixbuf> >  buffersMiniBarGreenV;
    static std::vector<Glib::RefPtr<Gdk::Pixbuf> >  buffersMiniBarRedV;
    static std::vector<Glib::RefPtr<Gdk::Pixbuf> >  buffersMiniBarVioletV;

    static std::vector<Glib::RefPtr<Gdk::Pixbuf> >  buffersGolden;
    static std::vector<Glib::RefPtr<Gdk::Pixbuf> >  buffersHueco;

  public:
    virtual Glib::RefPtr<Gdk::Pixbuf> obtenerImagen(int nroBuffer) = 0;

    static void CrearImagenes();

    int  xDesde, yDesde;

    Glib::RefPtr<Gdk::Pixbuf> buffer;

    explicit VistaFichaTablero(std::string color, bool, int, int);
    virtual ~VistaFichaTablero();

    virtual std::string getType();

    friend class VistaEscenario;
    friend class Juego;
    friend class PanelJuego;
};

#endif
